#version 450

// set #0 : global descriptor set

layout (set = 1, input_attachment_index = 0, binding = 0) uniform subpassInput albedo_attachment;
layout (set = 1, input_attachment_index = 1, binding = 1) uniform subpassInput position_attachment;
layout (set = 1, input_attachment_index = 2, binding = 2) uniform subpassInput normal_attachment;

layout (location = 0) in vec2 uv;

layout (location = 0) out vec4 outColor;

void main()
{
    // Read G-Buffer values from previous sub pass
    vec4 albedo = subpassLoad(albedo_attachment);
    vec3 position = subpassLoad(position_attachment).rgb;
    vec3 normal = subpassLoad(normal_attachment).rgb;
    // Simple shading (temporarily)
    outColor = albedo;
}